<!DOCTYPE html>
<html lang="zh-CN">
<head>
<#assign sec=JspTaglibs["/WEB-INF/tags/security.tld"]>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>广告投放系统</title>
<link rel="shortcut icon" href="${ctx}/favorite.ico" >
<link href="${ctx}/assets/main/css/base.css" rel="stylesheet">
<link href="${ctx}/assets/main/fonts/css/font-awesome.min.css" rel="stylesheet">
<link href="${ctx}/assets/main/fonts/css/ionicons.min.css" rel="stylesheet">
<link href="${ctx}/assets/main/css/main.css" rel="stylesheet">
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/main/js/main.js"></script>
</head>
<body>
<!--顶部菜单-->
<div class="heard-center">
  <div class="heard-logo">
        <#if userSession.iconPathurl ??>
            <img class="logo1" src="${userSession.iconPathurl!}" onclick="location.href='${ctx}/main/home'">
        <#else>
            <img src="${ctx}/${iconPath}" onclick="location.href='${ctx}/main/home'" alt="">
        </#if>
  </div>
  <div class="heard-person ">
    <div class="heard-person-info">
      <div class="heard-person-img">
        <i class="fa fa-user">&#xf007;</i>
      </div>
      <div class="heard-person-detail">
        <p>${userSession.description}</p>
        <p>${userSession.accountName}</p>
      </div>
    </div>
    <ul class="reglogin">
        <#if userSession.longinUrl ?? && userSession.longinUrl != ''>
            <li><a href="${ctx}/${userSession.longinUrl}" selectid="2">退出登录</a></li> 
        <#else>
            <li><a href="${ctx}/logout" selectid="2">退出登录</a></li> 
        </#if>
    </ul>
  </div>
</div>

<!--底部中心-->
<div class="foot-cener">
    <!--左侧菜单-->
    <div class="foot-left">
      <ul id="menu">
        <!-- 需求方平台菜单  -->
        <!-- begin -->
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_dashboard,ROLE_MANAGER')">
        <li>
          <a href="${ctx}/advertiser/main/dashboard" target="presonContainer">
             <i class="fa fa-home">&#xf015;</i>
             <span>首页</span>
          </a>
        </li>
        </@sec.authorize>
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_adgroup,ROLE_MANAGER')">
        <#if role == "agent">
            <li>
              <a href="${ctx}/advertiser/main/ad/advertiser/list" target="presonContainer">
                 <i class="fa fa-group">&#xf0c0;</i>
                 <span>广告主管理</span>
              </a>
            </li>
        <#elseif role == "advertiser">
            <li>
              <a href="${ctx}/advertiser/main/ad/order/list?advertiserId=${userSession.advertiserId}" target="presonContainer">
                    <i class="fa fa-sort-amount-asc">&#xf160;</i>
                    <span>订单管理</span>
              </a>
            </li>
        </#if>
        </@sec.authorize>
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_rpt,ROLE_MANAGER')">
        <#if sessionAccountType == 1>
        <li>
            <a href="${ctx}/rpt/order/init" target="presonContainer"><i class="fa fa-line-chart">&#xf201;</i><span>报表管理（Beta）</span></a>
            <ul>
                <li><a href="${ctx}/rpt/order/init" target="presonContainer">总体报表</a></li>
                <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/adgroupRealReport" target="presonContainer">策略实时报表</a></li>
            </ul>
        </li>
        </#if>
                <li>
                <a href="${ctx}/advertiser/main/ad/report/advertiser-report" target="presonContainer"> <i class="fa fa-line-chart">&#xf201;</i>
                        <span>报表管理</span>
                </a>
                    <ul>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report" target="presonContainer"> 总体报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/regionReport" target="presonContainer"> 地域报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/osReport" target="presonContainer"> 系统报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/orderReport" target="presonContainer"> 订单报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/orderHourReport" target="presonContainer"> 订单小时报表 </a></li>
                        <#if sessionAccountType == 1>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/jsAdReport" target="presonContainer"> 广告位报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/appAdReport" target="presonContainer"> APP广告位报表 </a></li>
                        <li><a href="${ctx}/advertiser/main/ad/report/advertiser-report/adgroupRealReport" target="presonContainer"> 策略实时报表 </a>
                        </li>
                         </#if>
                    </ul></li>
                    </@sec.authorize>
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_banner,ROLE_MANAGER')">
        <li>
          <a href="${ctx}/advertiser/main/ad/banner-template/list" target="presonContainer">
                <i class="fa fa-cubes">&#xf1b3;</i>
                <span>创意中心</span>
          </a>
        </li>
        </@sec.authorize>
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_finance,ROLE_MANAGER')">
        <li>
          <a href="${ctx}/advertiser/main/finance/adv-balance/distribution" target="presonContainer">
                <i class="fa fa-credit-card">&#xf09d;</i>
                <span>财务管理</span> 
          </a>
        </li>
        </@sec.authorize>
        
        <@sec.authorize access="hasAnyRole('ROLE_agent_account,ROLE_MANAGER')">
        <li>
          <a href="${ctx}/advertiser/main/authority/loginperson" target="presonContainer">
                <i class="fa fa-list-alt">&#xf022;</i>
                <span>账号管理</span> 
          </a>
           <ul>
               <li>
                 <a href="${ctx}/advertiser/main/authority/loginperson" target="presonContainer">
                   个人账号管理
                 </a>
               </li>
               <li>
                 <a href="${ctx}/advertiser/main/authority/list" target="presonContainer">
                   分账号管理
                 </a>
               </li>
            </ul>
        </li>
        </@sec.authorize>
        <!-- end -->
        
          <@sec.authorize access="hasAnyRole('ROLE_operator_finance,ROLE_MANAGER')">
          <li>
            <a class="iconfont financemanage" href="${ctx}/operator/main/financial/financial-management/list" target="presonContainer">
              财务管理
            </a>
          </li>
          </@sec.authorize>
          
          <@sec.authorize access="hasAnyRole('ROLE_operator_account,ROLE_MANAGER')">
            <li>
              <a class="iconfont account" href="${ctx}/operator/main/authority/loginperson" target="presonContainer">
               账号管理
              </a>
               <ul>
                   <li>
                     <a class="iconfont" href="${ctx}/operator/main/authority/loginperson" target="presonContainer">
                       个人账号管理
                     </a>
                   </li>
                   <li>
                     <a class="iconfont" href="${ctx}/operator/main/authority/list" target="presonContainer">
                       分账号管理
                     </a>
                   </li>
                </ul>
            </li>
            </@sec.authorize>
        <!-- end -->
        
        <!-- 后台管理平台菜单  -->
        <!-- begin -->
         <@sec.authorize access="hasAnyRole('ROLE_back_dashboard,ROLE_MANAGER')">
         <li>
            <a class="iconfont home" href="${ctx}/back/main/dashboard" target="presonContainer">
              首页
            </a>
          </li>
          </@sec.authorize>

          <@sec.authorize access="hasAnyRole('ROLE_back_finance,ROLE_MANAGER')">
          <li>
            <a class="iconfont financemanage" href="${ctx}/back/main/finance/finance-management" target="presonContainer">
            财务管理
            </a>
          </li>
          </@sec.authorize>
          
          <@sec.authorize access="hasAnyRole('ROLE_back_account,ROLE_MANAGER')">
          <li>
            <a class="iconfont account" href="${ctx}/back/main/authority/loginperson" target="presonContainer">
            账号管理
            </a>
            <ul>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/authority/loginperson" target="presonContainer">
                  个人账号管理
                  </a>
                </li>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/client-account" target="presonContainer">
                  平台账号管理
                  </a>
                </li>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/authority" target="presonContainer">
                  分账号管理
                  </a>
                </li>
             </ul>
          </li>
          </@sec.authorize>
          
          <@sec.authorize access="hasAnyRole('ROLE_back_authority,ROLE_MANAGER')">
          <li>
            <a class="iconfont authority" href="${ctx}/back/main/resources/list" target="presonContainer">
              权限管理
            </a>
              <ul>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/resources/list" target="presonContainer">
                  菜单管理
                  </a>
                </li>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/role/list" target="presonContainer">
                  角色管理
                  </a>
                </li>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/account/list" target="presonContainer">
                  账号权限管理
                  </a>
                </li>
             </ul>
          </li>
          </@sec.authorize>
          
          <@sec.authorize access="hasAnyRole('ROLE_back_backmanage,ROLE_MANAGER')">
          <li>
              <ul>
                <li>
                  <a class="iconfont" href="${ctx}/back/main/blacklist/apmac-blacklist/list" target="presonContainer">
                 黑名单
                  </a>
                </li>
             </ul>
          </li>
          </@sec.authorize>
          
        <!-- end -->
      </ul>
      <div class="menu-close"></div>
    </div>

    <!--右侧框架-->
    <div class="foot-right">
    <@sec.authorize access="hasAnyRole('ROLE_agent_dashboard,ROLE_MANAGER')">
        <iframe src="${ctx}/advertiser/main/dashboard" id="iframepage" width="100%" name="presonContainer" frameborder="0"></iframe>
    </@sec.authorize>
    <@sec.authorize access="hasAnyRole('ROLE_operator_dashboard,ROLE_MANAGER')">
        <iframe src="${ctx}/operator/main/dashboard" id="iframepage" width="100%" name="presonContainer" frameborder="0"></iframe>
    </@sec.authorize>
    <@sec.authorize access="hasAnyRole('ROLE_back_dashboard,ROLE_MANAGER')">
        <iframe src="${ctx}/back/main/dashboard" id="iframepage" width="100%" name="presonContainer" frameborder="0"></iframe>
    </@sec.authorize>
    </div>
</div>

<#include "/main/home/common.ftl"/>
<script type="text/javascript">
    PersonalReg();
  menuClose(); //关闭菜单
</script>
</body>
</html>
